package com.wei.tang.fragment;

import com.wei.tang.R;
import com.wei.tang.base.BaseFragment;
import com.wei.tang.ui.me.MyInformationActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class FindInformationFragment extends BaseFragment {
	private Activity mySelf = null;

	@InjectView(R.id.rl_app_head_left)
	RelativeLayout rl_app_head_left;
	@InjectView(R.id.tv_app_head_left_content)
	TextView tv_app_head_left_content;
	@InjectView(R.id.iv_app_head_left_image)
	ImageView iv_app_head_left_image;
	@InjectView(R.id.rl_app_head_center)
	RelativeLayout rl_app_head_center;
	@InjectView(R.id.tv_app_head_center_content)
	TextView tv_app_head_center_content;
	@InjectView(R.id.iv_app_head_center_image)
	ImageView iv_app_head_center_image;
	@InjectView(R.id.rl_app_head_right)
	RelativeLayout rl_app_head_right;
	@InjectView(R.id.tv_app_head_right_content)
	TextView tv_app_head_right_content;
	@InjectView(R.id.iv_app_head_right_image)
	ImageView iv_app_head_right_image;

	@InjectView(R.id.ll_find_info_wei)
	LinearLayout ll_find_info_wei;
	@InjectView(R.id.ll_find_info_course)
	LinearLayout ll_find_info_course;
	@InjectView(R.id.ll_find_info_teacher)
	LinearLayout ll_find_info_teacher;

	@Override
	public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
			@Nullable Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.find_information_fragment, container, false);
		ButterKnife.inject(this, view);
		initData();
		initView(view);
		return view;
	}

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		mySelf = activity;
	}

	@Override
	public void initView(View view) {
		tv_app_head_center_content.setText("发现");
	}

	@Override
	public void initData() {
	}

	@Override
	@OnClick({ R.id.ll_find_info_wei, R.id.ll_find_info_course, R.id.ll_find_info_teacher })
	public void onClick(View v) {
		Intent intent = null;
		Bundle bundle = null;
		int id = v.getId();
		switch (id) {
		case R.id.ll_find_info_wei:
			intent = new Intent(mySelf, MyInformationActivity.class);
			startActivity(intent);
			break;
		case R.id.ll_find_info_course:
			intent = new Intent(mySelf, MyInformationActivity.class);
			startActivity(intent);
			break;
		case R.id.ll_find_info_teacher:
			intent = new Intent(mySelf, MyInformationActivity.class);
			startActivity(intent);
			break;
		}
	}
}
